Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: workaround for cmake bug#18349 #2244

Merged
merged 2 commits into from
Sep 10, 2018

Conversation

junghans
Copy link
Member

@junghans junghans commented Sep 9, 2018

https://gitlab.kitware.com/cmake/cmake/issues/18349

Usually I am against adding random workarounds to any code base, but this is a bug in such wide range of CMake versions that you guys will have users with this issue for years....

@codecov
Copy link

codecov bot commented Sep 9, 2018

Codecov Report

Merging #2244 into python will increase coverage by <1%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           python   #2244    +/-   ##
=======================================
+ Coverage      71%     71%   +<1%     
=======================================
  Files         377     377            
  Lines       18941   18941            
=======================================
+ Hits        13560   13580    +20     
+ Misses       5381    5361    -20
Impacted Files Coverage Δ
src/core/layered.cpp 79% <0%> (ø) ⬆️
src/core/domain_decomposition.cpp 91% <0%> (+3%) ⬆️
src/core/lattice.cpp 89% <0%> (+6%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7db1d71...c2639fa. Read the comment docs.

@KaiSzuttor
Copy link
Member

@junghans have you checked if doing the following would fix the issue?:

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MPI_CXX_COMPILE_FLAGS}")

The documentation says:

In new projects, please use the MPI__XXX equivalents

@junghans
Copy link
Member Author

@KaiSzuttor the problem persists. If you look at my fix, the problem is actually in MPI_COMPILE_OPTIONS, which then becomes MPI_${LANG}_COMPILE_OPTIONS, which is then part of MPI_CXX_COMPILE_FLAGS.

@junghans
Copy link
Member Author

@KaiSzuttor: You guys required cmake-3.0 which came with https://gitlab.kitware.com/cmake/cmake/blob/v3.0.0/Modules/FindMPI.cmake, so this might be a good time to switch to MPI_CXX_COMPILE_FLAGS anyhow.

@KaiSzuttor
Copy link
Member

thanks, @junghans Could you please switch to the new syntax since you are touching this?

@junghans
Copy link
Member Author

@KaiSzuttor Done

@KaiSzuttor
Copy link
Member

thanks @junghans

@KaiSzuttor KaiSzuttor merged commit d69ae67 into espressomd:python Sep 10, 2018
@junghans junghans deleted the cmake_mpi_workaround branch September 10, 2018 12:56
@KaiSzuttor KaiSzuttor added this to the Espresso 4.0.1 milestone Sep 10, 2018
@junghans
Copy link
Member Author

RudolfWeeber pushed a commit to RudolfWeeber/espresso that referenced this pull request Oct 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants